home *** CD-ROM | disk | FTP | other *** search
/ Softwarová Záchrana 3 / Softwarova-zachrana-3.bin / Xteq X-Setup / xqdcXSP-Setup-EN.exe / {app} / plugins / XQ IE BHO 1.xpl < prev    next >
Text File  |  2004-03-01  |  5KB  |  183 lines

  1. "FILE"="Xteq Systems X-Setup Plugin 6.0"
  2. "TYPE"="8"
  3. "COUNT"="2"
  4. "UIPATH 1"="Internet\Internet Explorer\Security"
  5. "UIPATH 2"="Virtual Paranoia\Hijacker Places"
  6. "NAME"="Browse Helper Objects"
  7. "VERSION"="1.02"
  8. "LANGUAGE"="VBScript"
  9. "TEXT 1"="Show Info"
  10. "TEXT 2"="Enable/Disable"
  11. "DESCRIPTION 1"="Browser Helper Objects (BHO) are DLLs, that are loaded in Internet Explorer as soon as IE starts."
  12. "DESCRIPTION 2"="Some BHOs, for example the Adobe Acrobat BHO, extend the use of IE and allow users to do things that would not be possible without BHOs."
  13. "DESCRIPTION 3"="However, some Spyware programs also use BHOs and there is no way in the normal IE configuration where they can be deactivated."
  14. "DESCRIPTION 4"="Simply click on "Show Info" to see which DLL is loaded when this BHOs is activated. To deactive it, click "Enable/Disable"." 
  15. "AUTHOR"="Xteq Systems"
  16. "CONTACTURL"="http://www.xteq.com"
  17. "COPYRIGHT"="Copyright ⌐ Xteq Systems - All Rights Reserved"
  18. "COMMENT 1"="See also: BHOCaptor - Copyright (c) Adam Stiles - See http://www.xcaptor.org/ for updates"
  19. "COMMENT 2"="Also: http://support.microsoft.com/support/kb/articles/Q179/2/30.ASP"
  20.  
  21.  
  22.  
  23. sPath="HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\"
  24. sPath_CLSID="HKCR\CLSID\"
  25.  
  26. dim iItems        'contains the total amount of the registry keys
  27. Dim aryItems()    'contains the name of the Registry paths (direct files starting with ".")
  28. Dim aryItemsLoc() 'contains the registry location  (\ShellNew or \ShellNew-)
  29. Dim aryDesc()     'contains the description of the items
  30.  
  31.  
  32.  
  33. Sub Plugin_Initialize 
  34.  iItems=0
  35.  
  36.  if RegPathExists(sPath) then
  37.     Call ReadRegistry
  38.  else
  39.     Call Disable
  40.  end if
  41. End Sub
  42.  
  43.  
  44. Sub ReadRegistry
  45.  for l=1 to iItems
  46.      Call SetUIElement(l,"")
  47.  next 
  48.  
  49.  iItems=RegEnumPaths(sPath) 
  50.  ReDim aryItems(iItems)
  51.  
  52.  For l=1 to iItems 
  53.      'get the GUID
  54.      sGUID=RegEnumElement(l)
  55.      aryItems(l)=sGUID 
  56.      bIsDeactivated=false
  57.  
  58.      if Left(sGUID,1)="-" then
  59.         sGUID=right(sGUID,len(sGUID)-1)
  60.         bIsDeactivated=true
  61.      end if
  62.  
  63.  
  64.      'get the desc
  65.      sName=RegReadValue(sPath_CLSID & sGUID & "\@")
  66.      if len(sName)=0 then 
  67.         sName=sGUID
  68.      end if  
  69.     
  70.      if bIsDeactivated=false then
  71.         Call SetUIElement(l,sName) 
  72.      else 
  73.         Call SetUIElement(l,sName & " [Deactivated]")
  74.      end if 
  75.  next
  76.  
  77.  
  78. End Sub
  79.  
  80. Sub GetInfo(Item)
  81.   'get the filename
  82.   sFile=RegReadValue(sPath_CLSID & Item & "\InprocServer32\@")
  83.   
  84.   Call MsgInformation(sFile) 
  85. End Sub
  86.  
  87.  
  88.  
  89. Sub Plugin_Apply(ElementIndex,ElementSubIndex)
  90.  if ElementSubIndex>0 then
  91.     sGUID=aryItems(ElementSubIndex)
  92.     bDeac=false
  93.  
  94.     if left(sGUID,1)="-" then
  95.        sGUID=right(sGUID,len(sGUID)-1)
  96.        bDeac=true
  97.     else
  98.        sGUID=sGUID
  99.        bDeac=false
  100.     end if
  101.  
  102.     if ElementIndex=1 then '//Information
  103.        Call GetInfo(sGUID)
  104.     else
  105.        if bDeac=false then
  106.           Call MoveFolder(sPath & sGUID, sPath & "-" & sGUID)
  107.        else
  108.           Call MoveFolder(sPath & "-" & sGUID, sPath & sGUID)
  109.        end if      
  110.  
  111.        Call ReadRegistry()  
  112.        Call MsgInformation("Changes made!") 
  113.     end if
  114.  
  115.  else
  116.     Call MsgError("Please select an item")
  117.  end if
  118. End Sub
  119.  
  120.  
  121.  
  122. Sub MoveFolder(CurrentFolder,NewFolder)
  123.  if right(CurrentFolder,1)<>"\" then
  124.     CurrentFolder=CurrentFolder & "\"
  125.  end if
  126.  
  127.  if right(NewFolder,1)<>"\" then
  128.     NewFolder=NewFolder & "\"
  129.  end if
  130.  
  131.  'write a value
  132.  Call RegWriteValue(CurrentFolder & "XSET Changed","yes",1)
  133.  
  134.  
  135.  'move values for base path
  136.  Call MoveValues(CurrentFolder,NewFolder)
  137.  
  138.  
  139.  'check for any existing subfolder
  140.  iC=RegEnumPaths(CurrentFolder)
  141.  if iC>0 then
  142.     Dim aryTemp()
  143.     ReDim aryTemp(iC)
  144.  
  145.     for i=1 to iC 
  146.         aryTemp(i)=RegEnumElement(i) & "\"
  147.     next
  148.  
  149.     for i=1 to iC
  150.         sP_Old=CurrentFolder & aryTemp(i)
  151.         sP_New=NewFolder & aryTemp(i)
  152.         Call MoveValues(sP_Old,sP_New)        
  153.         Call RegDeletePath(sP_Old)      
  154.     next 
  155.  end if
  156.  
  157.  
  158.  'remove old path
  159.  Call RegDeletePath(CurrentFolder) 
  160. End Sub
  161.  
  162.  
  163. Sub MoveValues(OldFolder,NewFolder)
  164.  iC=RegEnumValues(OldFolder)
  165.  for i=1 to iC
  166.      x_Name=RegEnumElement(i)
  167.      x_Type=RegValueType(OldFolder & x_Name)
  168.      x_Value=RegReadValue(OldFolder & x_Name)
  169.  
  170.      'move to new location
  171.      Call RegWriteValue(NewFolder & x_Name,x_Value,x_Type)
  172.  
  173.      'delete old value
  174.      Call RegDeleteValue(OldFolder & x_Name)
  175.  next 
  176.  
  177. End Sub
  178.  
  179.  
  180.  
  181. Sub Plugin_Terminate 
  182. End Sub
  183.